package schoolWork.work03.text1;

public class Student extends Person{
    private String major;

    public Student() {
    }

    public Student(String name, String sex, int birthyear, String major) {
        super(name, sex, birthyear);
        this.major = major;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }
    @Override
    public String toString(){
        super.toString();
        System.out.println("major =" + major);
        return null;
    }
}
